import React, { Component } from "react";
// import { Link } from "react-router-dom";
import "../css/Login.css";
class Login extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  render() {
    return (
      <div className="login">
        <p>
          <input type="text" placeholder="邮箱/手机号码/小米ID" ref="user" />
        </p>
        <p>
          <input type="password" placeholder="密码" ref="pass" />
        </p>
        <button onClick={() => {
            let user =this.refs.user.value
            this.props.history.push({
                pathname:'/',
                state:{
                    user:user
                }
            })
        }}>登录</button>
      </div>
    );
  }
}

export default Login;
